﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace BullShitPoker
{
    class Worker
    {
        public static string[] Types = {"One Card", "Pair", "Two Pairs", 
                "Set", "Flash", "Street", "Full House (3 and 2)", "Square", "Street Flash",
                "Royal Flash", "Five Cards", "Six Cards", "Seven Cards", "Eight Cards"};
        public static string[] Cards = { "2", "3", "4", "5", "6", "7", "8", "9", 
                                    "10", "Jack", "Queen", "King", "Ace" };
        public static string[] Suits = { "Diamonds", "Crosses", "Hearts", "Spades" };
        public static MainWindow form;
        public static void RoundStart()
        {
            if (form != null)
            {
                form.Invoke(form.sRound);
            }
        }
        public static void Chat(string s)
        {
            if (form != null)
            {
                form.Invoke(form.mChat, s);
            }
        }
        public static void NextMove(string player)
        {
            if (form != null)
            {
                form.Invoke(form.mNextMove, player);
            }
        }

        public static void StopGame()
        {
            if (form != null)
            {
                form.Invoke(form.sStopGame);
            }
        }

        public static void SendMove(string move)
        {
            Client.Sender(form.name + "\nMove " + form.name + "|" + move);
            //MessageBox.Show(move);
        }

        public static void NewGame()
        {
            if (form != null)
            {
                form.Invoke(form.sCleanChat);
                form.Invoke(form.sStopGame);
            }
            
        }

        public static long getTime()
        {
            return (long)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
        }

    }
}
